package com.js.rtu.greendao.dao;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.js.rtu.greendao.db.HistoryBean;
import com.js.rtu.greendao.db.HistoryInfoBean;

import com.js.rtu.greendao.dao.HistoryBeanDao;
import com.js.rtu.greendao.dao.HistoryInfoBeanDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig historyBeanDaoConfig;
    private final DaoConfig historyInfoBeanDaoConfig;

    private final HistoryBeanDao historyBeanDao;
    private final HistoryInfoBeanDao historyInfoBeanDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        historyBeanDaoConfig = daoConfigMap.get(HistoryBeanDao.class).clone();
        historyBeanDaoConfig.initIdentityScope(type);

        historyInfoBeanDaoConfig = daoConfigMap.get(HistoryInfoBeanDao.class).clone();
        historyInfoBeanDaoConfig.initIdentityScope(type);

        historyBeanDao = new HistoryBeanDao(historyBeanDaoConfig, this);
        historyInfoBeanDao = new HistoryInfoBeanDao(historyInfoBeanDaoConfig, this);

        registerDao(HistoryBean.class, historyBeanDao);
        registerDao(HistoryInfoBean.class, historyInfoBeanDao);
    }
    
    public void clear() {
        historyBeanDaoConfig.clearIdentityScope();
        historyInfoBeanDaoConfig.clearIdentityScope();
    }

    public HistoryBeanDao getHistoryBeanDao() {
        return historyBeanDao;
    }

    public HistoryInfoBeanDao getHistoryInfoBeanDao() {
        return historyInfoBeanDao;
    }

}
